<?php
namespace app\erp\validate;

use think\Validate;

class Brandrule extends Validate
{

    protected $rule = [
        'brand_name' => 'require|unique:brand,brand_name^partner_id'
    ];

    protected $message = [
        'brand_name.require' => '品牌名称必须填写',
        'brand_name.unique' => '品牌名称已存在',
    ];
    protected $scene = [
        'edit' => [
            'brand_name' => 'unique:brand,brand_name^partner_id'
        ]
    ];
}